package com.reader.core.entity;

import com.reader.core.validator.group.AddGroup;
import com.reader.core.validator.group.UpdateGroup;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 *
 *
 *
 * @desc token 对象
 * @author jiahaikun
 * @since 2018-06-20
 */
public class Token implements Serializable {
    /**
     *    每次访问服务器都要带的token
     */

    /**
     * 用户ID
     */
    private  Integer userID;
    @NotBlank(message="token不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String access_token;
    /**
     * 过期时间
     */
    private Long expire_in;

    /**
     *    用于刷新获取access_token
     */
    private String refresh_token;

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    /**
     * useraent 信息
     */
    private String userAgent;


    public Integer getUserID() {
        return userID;
    }

    public void setUserID(Integer userID) {
        this.userID = userID;
    }

    public String getAccess_token() {
        return access_token;
    }

    public void setAccess_token(String access_token) {
        this.access_token = access_token;
    }
    public Long getExpire_in() {
        return expire_in;
    }

    public void setExpire_in(Long expire_in) {
        this.expire_in = expire_in;
    }

    public String getRefresh_token() {
        return refresh_token;
    }

    public void setRefresh_token(String refresh_token) {
        this.refresh_token = refresh_token;
    }



}
